const router = require('koa-router')();

router.prefix('/focus');

router.get('/', async ctx => {
  ctx.redirect('/admin/focus/index')
});

router.get('/index', async ctx => {
  ctx.render('admin/focus/index', {
    list: [
      {imgUrl: ctx.state.__ROOT__ + '/images/user2-160x160.jpg', url: 'www.baidu.com', status: 1},
      {imgUrl: ctx.state.__ROOT__ + '/images/user2-160x160.jpg', url: 'www.baidu.com', status: 1},
      {imgUrl: ctx.state.__ROOT__ + '/images/user2-160x160.jpg', url: 'www.baidu.com', status: 1},
      {imgUrl: ctx.state.__ROOT__ + '/images/user2-160x160.jpg', url: 'www.baidu.com', status: 0},
      {imgUrl: ctx.state.__ROOT__ + '/images/user2-160x160.jpg', url: 'www.baidu.com', status: 1}
    ]
  })
});

router.get('/add', async ctx => {
  ctx.render('admin/focus/add', {

  })
});

module.exports = router;